{extend name="common/adminBase" /}
{block name="body"}
<body>
<style>
    .r{
        float: right;
    }
</style>
<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-body ">
                    <form class="layui-form layui-col-space5" style="height:30px;">
                  
                         <div class="layui-inline layui-show-xs-block r">
                            <button class="layui-btn"  lay-submit="" lay-filter="sreach"><i class="layui-icon">&#xe615;</i></button>
                        </div>
                        <div class="layui-inline layui-show-xs-block r">
                            <select name="if_inportant">
                                <option value="">---请选择---</option>
                                <option value='重点课题'>重点课题</option>
                                <option value="一般课题">一般课题</option>
                            </select>
                        </div>
                        <div class="layui-inline layui-show-xs-block r">
                            <select name="cate">
                                <option value="">---请选择---</option>
                                <option value='52'>直属校</option>
                                <option value="2">高职高校</option>
                                <option value="68">其他中小学/中职/特教学校</option>
                            </select>
                        </div>
                        <input type="hidden" name="id" value="{$id}" />
                        <input type="hidden" name="nian" value="{$nian}" />
                        <div class="layui-inline layui-show-xs-block r">
                            <input type="text" name="school" value="{:input('school')}" placeholder="请输入学校名称" autocomplete="off" class="layui-input">
                      
                        </div>
                    </form>

                </div>
                {if $data}
                <div class="layui-card-body layui-table-body layui-table-main">
                    <table class="layui-table layui-form">
                        <thead>
                        <tr>
                            <th>ID</th>
                            <th>所在单位</th>
                            <th>课题名称</th>
                            <th>申请人姓名</th>
                             <th>项目级别</th>
                            {volist name="title" id="v"}
                            <th>{$v}</th>
                            {/volist}
                           
                           
                            <th>备注</th>
                             <th>专家分数<span class="layui-table-sort layui-inline"><i onclick="asc()" class="layui-edge layui-table-sort-asc" title="升序"></i><i onclick="desc()" class="layui-edge layui-table-sort-desc" title="降序"></i></span></th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        {volist name="data" id="v"}
                        <tr>
                            <td>{$v.id}</td>
                       
          
                            <td>{$v.ctitle}</td>
                            <td>{$v.content.title}</td>
                            <td>{$v.relname}</td>
                            <td>{$v.if_inportant}</td>
                            {volist name="$v.statusdes" id="m" key="kk"}
                                <td>{$m}</td>
                            {/volist}
                            
                            
                            <td>{$v.message|raw}</td>
                            <td><a href="#" onclick="xadmin.open('查看','/index/center/chakan?id={$v.id}&type=1')">{$v.fen}&nbsp;&nbsp;{if $v.shenhe!=1}有未打分专家{/if}</a></td>
                            <td class="td-manage">
                            {if$v.status==3&&$v.shenhe==1}
                              <!--<a class="layui-btn" href="#" onclick="xadmin.open('同意','/index/center/agreen?id={$v.id}',800,600)">通过</a><br/><br/>-->
                              <!--<a class="layui-btn" href="#" onclick="xadmin.open('拒绝','/index/center/disagreen?id={$v.id}',800,600)">拒绝</a><br/><br/>-->
                              <a href="javascript:;"class="layui-btn" id="sp" onclick="sp({$v.id})">审批</a>
                            {/if}
                            <a class="layui-btn" href="#" onclick="xadmin.open('查看','/index/center/chakan?id={$v.id}')">查看</a>
                       
                            </td>
                        </tr>
                        {/volist}
                        </tbody>
                    </table>
                </div>
                <div class="layui-card-body ">
                    <div class="page">
                        <div>
                           <?php echo $page?>
                        </div>
                    </div>
                </div>
                {else/}
                    <div style="width:100%;font-size:18px;text-align:center;">目前没有下属老师进行课题申报，请耐心等待</div>
                {/if}
            </div>
        </div>
    </div>
</div>

</iframe>

</body>
<script>
    function sp(id){
        layer.open({
            type: 1,
            fix: false,
            shade: 0.3,
            title: '审核',
            btn: ['通过','驳回','取消'],
            // 弹层外区域关闭
            shadeClose: true,
            btn1: function(index, layero) {
                //点击第一个按钮处理逻辑
                xadmin.open('同意','/index/center/agreen?id='+id,800,600);
            },
            btn2: function(index, layero){
                //点击第二个按钮处理逻辑
                xadmin.open('拒绝','/index/center/disagreen?id='+id,800,600);
            }
        });
    };
    

    layui.use('form', function(){
        var  form = layui.form;
    });
    function openmydoc(path){ 
        $('#handout_wrap_inner').media({
            width: '100%',
            height: '1000px',
            autoplay: true,
            src:"'"+path+"'",
        }); 
    } 

    function colse(){
        // $("#handout_wrap_inner").css("display":'none');
    }
    function asc(){
        // alert('升序');
        location.href='/index/center/ketishenqing?nian={$nian}&id={$id}&order=asc';
    }
    function desc(){
        // alert('降序');
        location.href='/index/center/ketishenqing?nian={$nian}&id={$id}&order=desc';
    }
    /*用户-停用*/
    function member_del(id){
        layer.confirm('确认要删除吗？',function(index){
            $.ajax({
                url:'delAdmin',
                data:{id:id},
                type:'post',
                dataType:'json',
                success:function (res) {
                    if (res.status ==1){
                        layer.msg(res.msg,{icon:1,time:1500},function () {
                            location.reload();
                        });
                    }else{
                        layer.alert(res.msg,function (index) {
                            layer.close(index);
                        })
                    }
                }
            })

        });
    }


</script>

{/block}